import request from '../request'
import type { LoginFormData } from '@/types/login'
export function login(data:LoginFormData) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}
// 获取用户信息
export function getUserInfo(id:number) {
  return request({
    url: '/api/getUserInfo/'+id,
    method: 'get'
  })
}
// 获取菜单树
export function getRouters(data:{phone:string}) {
  return request({
    url: '/api/getRouter',
    method: 'post',
    data
  }) 
}